package com.auth.manage.gateway.auth;

import cn.dev33.satoken.session.SaSession;
import cn.dev33.satoken.stp.StpInterface;
import cn.dev33.satoken.stp.StpUtil;
import com.auth.manage.common.user.api.constant.UserConstant;
import com.auth.manage.common.user.api.responce.UserInfo;

import java.util.List;

public class StpInterfaceImpl implements StpInterface {

    @Override
    public List<String> getPermissionList(Object loginId, String s) {
        SaSession session = StpUtil.getSessionByLoginId(loginId);
        UserInfo userInfo = (UserInfo) session.get(UserConstant.USER_INFO);
        return List.of();
    }

    @Override
    public List<String> getRoleList(Object loginId, String s) {
        UserInfo userInfo = (UserInfo) StpUtil.getSessionByLoginId(loginId).get("userInfo");
        return List.of();
    }
}